#! /usr/bin/env python
# pymakemenu

__doc__ = \
"""Generate an (S)VCD/DVD menu MPEG (to replace the 'makemenu' shell
script).
"""

import sys
from libtovid.menu import Menu
from libtovid.log import Log

log = Log('pymakemenu')

if __name__ == '__main__':
    """Create a Menu with provided options and generate it."""
    # If no arguments were provided, print usage notes
    # TODO: Proper argument verification
    if len(sys.argv) < 3:
        print 'Usage: pymakemenu [options] -out NAME'
        print 'Where [options] may be any of the following:'
        print Menu().options.usage()
        print 'Please provide an output name (-out).'
        sys.exit()

    args = sys.argv[1:]
    menu = Menu(args)
    menu.generate()
